From: PhilProg Date: Fri, 3 Jun 2022 04:53:11 +0000 (+0000) Subject: messageList: Only close messages via delete key if they can be closed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~321 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=795723fe8533cc66cf5741ad81bd90e22aa90c3c;p=gnome-shell.git messageList: Only close messages via delete key if they can be closed If the delete key is pressed while a message/MPRIS indicator is focused GNOME now asks whether the message/MPRIS indicator is closable. If yes it will be closed but if not it won't be closed. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5536 Part-of: --- diff --git a/js/ui/messageList.js b/js/ui/messageList.js index f4e43f7ae..29e76752b 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -535,8 +535,10 @@ var Message = GObject.registerClass({ if (keysym == Clutter.KEY_Delete || keysym == Clutter.KEY_KP_Delete) { - this.close(); - return Clutter.EVENT_STOP; + if (this.canClose()) { + this.close(); + return Clutter.EVENT_STOP; + } } return super.vfunc_key_press_event(keyEvent); }